import 'package:flutter/material.dart';
import 'package:test1/View/MyRowText.dart';
import 'package:test1/pages/net/Flutter_Net_Dio_Page.dart';
import 'package:test1/pages/net/Flutter_Net_HttpClient_Page.dart';
import 'package:test1/pages/net/Flutter_Net_Http_Page.dart';

class Flutter_Net_Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Center"),
        ),
        body: Container(
            color: Color(0xfff1f1f1),
            child: ListView(
              children: <Widget>[
//                MyRowText("原生httpClient方式", () =>
//                    Navigator.push(
//                        context,
//                        MaterialPageRoute(builder: (BuildContext context) {
//                          return Flutter_Net_HttpClient_Page();
//                        }))
//                ),
                MyRowText("http库方式", () =>
                    Navigator.push(
                        context,
                        MaterialPageRoute(builder: (BuildContext context) {
                          return Flutter_Net_Http_Page();
                        }))
                ),
                MyRowText("dio库方式", () =>
                    Navigator.push(
                        context,
                        MaterialPageRoute(builder: (BuildContext context) {
                          return Flutter_Net_Dio_Page();
                        }))
                ),
              ],
            )
        ),
      ),
    );
  }
}
